package com.cpsdna.bean.user;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Table;

import java.util.Date;

/**
 * Created by Jianghao on 2017/2/27.
 * 登录日志
 *
 * @author Howe(howechiang@gmail.com)
 */
@Table("user_login_log")
public class LoginLog {

    /**
     * 用户ID
     */
    @Column("user_id")
    private Integer userId;

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * 登录设备
     */
    @Column("login_agent")
    private String loginAgent;

    public String getLoginAgent() {
        return loginAgent;
    }

    public void setLoginAgent(String loginAgent) {
        this.loginAgent = loginAgent;
    }

    /**
     * 登录IP
     */
    @Column("login_ip")
    private String loginIP;

    public String getLoginIP() {
        return loginIP;
    }

    public void setLoginIP(String loginIP) {
        this.loginIP = loginIP;
    }

    /**
     * 登录时间
     */
    @Column("login_time")
    private Date loginTime;

    public Date getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }

    public LoginLog() {
    }

    public LoginLog(Integer userId, String loginAgent, String loginIP, Date loginTime) {
        this.userId = userId;
        this.loginAgent = loginAgent;
        this.loginIP = loginIP;
        this.loginTime = loginTime;
    }

    @Override
    public String toString() {
        return "LoginLog{" +
                "userId=" + userId +
                ", loginAgent='" + loginAgent + '\'' +
                ", loginIP='" + loginIP + '\'' +
                ", loginTime=" + loginTime +
                '}';
    }
}